﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    @V5.Html.Partial("User/_ChkUser")
    <title>修改密码</title>
    <meta name="Keywords" content="网络购物，网上超市，网上购物，购物，网上商店，购物商城,购物网，超市网,世博会门票购买" />
    <meta name="Description" content="用鼠标逛超市，不用排队，方便实惠送上门，网上购物新生活。" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" href="/@V5.Config.TemplatePath/css/index.css"/>
    <link type="text/css" rel="stylesheet" href="/@V5.Config.TemplatePath/css/product_detail.css"/> 
    <script src="/@V5.Config.TemplatePath/javascript/jquery.min.js" type="text/javascript"></script>
    <script src="/@V5.Config.TemplatePath/javascript/Comon.js" type="text/javascript" charset="UTF-8"></script> 
    <script src="/@V5.Config.TemplatePath/javascript/loading/loading_source.js" type="text/javascript" charset="UTF-8"></script>
    @V5.Html.Partial("includes/tView")
</head>
<body>
    @*@V5.Html.Partial("includes/header")*@
    @{
        var user = (V5_Model.ModelGZUser)Session["isLogin"];  
        }
    <div class="wrap">
        @V5.Html.Partial("User/_Menu")
        <div class="right_content">
            <div class="crumb">
                <a class="home" href="/index.aspx" target="_blank">首页</a> > <span>个人中心</span> &nbsp;&nbsp;&nbsp;<a href="/loginOut.aspx" style="background:none;color:Red;font-weight:bold">退出登录</a></div>
            <div class="personal_box">
                <h3> 修改密码</h3>
                <div class="personal_detail">
                    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="data">
                        
                        <tr>
                            <td>旧密码：</td>
                            <td><input id="txt_old_pwd" type="password" /></td>
                        </tr>
                        <tr>
                            <td>新密码：</td>
                            <td><input id="txt_new_pwd" type="password" /></td>
                        </tr> 
                        <tr>
                            <td colspan=2><input type="button" value="保存" onclick="EdtPwd()" /></td>
                        </tr>
                    </table>
                </div> 
            </div>
        </div>
        <div class="clearfix">
        </div>
        <div class="mt10">
        </div>
    </div>
   @* @V5.Html.Partial("includes/Footer")*@
    <!--回顶部 -->
</body>
</html>

 <script>
     var EdtPwd = function () {
         var txt_old_pwd = $("#txt_old_pwd");
         var txt_new_pwd = $("#txt_new_pwd");

         if ($.trim(txt_old_pwd.val()) == "") {
             msg("请输入旧密码！");
             return;
         }

         if ($.trim(txt_new_pwd.val()) == "") {
             msg("请输入新密码！");
             return;
         }

         $.ajax({
             type: "POST",
             url: "/ChkPwd.aspx",
             data: "type=0&pwd=" + txt_old_pwd.val(),
             beforeSend: function () {
                 showLoading();
             },
             success: function (data) {
                 if (data == "0") {
                     $.ajax({
                         type: "POST",
                         url: "/ChkPwd.aspx",
                         data: "type=1&pwd=" + txt_new_pwd.val(),
                         beforeSend: function () {
                             showLoading();
                         },
                         success: function (data) {
                             msg("修改成功！");
                             window.location.href = "/index.aspx?t=user/mybill";
                         },
                         complete: function () {
                             hideLoading();
                         }
                     });
                 }
                 else {
                     msg(data);
                 }
             },
             complete: function () {
                 hideLoading();
             }
         });


     }
 
 </script>